﻿using System.Collections.Generic;
using HK.Core.Common.Protocol;
using HK.Core.Common.Protocol.Data;

namespace HK.Editor.GUIEx.Protocol.TreeView.Data
{
    /// <summary>
    /// 接口 : 树枝
    /// </summary>
    public interface ITreeBranch : IJsonData
    {
        /// <summary>
        /// Id
        /// </summary>
        int Id { get; set; }
        
        /// <summary>
        /// Name
        /// </summary>
        string Name { get; }
        
        /// <summary>
        /// 深度
        /// </summary>
        int Depth { get; set; }
        
        /// <summary>
        /// 根节点标志位
        /// </summary>
        bool IsRoot { get; }
        
        /// <summary>
        /// 父节点
        /// </summary>
        ITreeBranch Parent { get; set; }
        
        /// <summary>
        /// 子节点列表
        /// </summary>
        List<ITreeBranch> Children { get; set; }
        
        /// <summary>
        /// 子节点数量
        /// </summary>
        int ChildCount { get; }
        
        /// <summary>
        /// 子节点列表有效标志位
        /// </summary>
        bool ValidChildren { get; }
        
        /// <summary>
        /// 是否拥有子节点标志位
        /// </summary>
        bool HasChildren { get; }
    }
}
